{% extends 'index/base.html' %}

{% block title %}
<title>搜索结果-</title>
{% endblock title %}

{% block js %}
{% endblock js %}

{% block nav_bar %}
{% endblock nav_bar %}


{% block content %}
<section id="main" class="col-md-8">
    <div class="tit">
        <div class="kratos-hentry clearfix">
            <h1 class="kratos-post-header-title">搜索结果：{{ search }}</h1>
            <h1 class="kratos-post-header-title"></h1>
        </div>
    </div>
    <div class="list_haha">
        {% if news_list %}
        {% for news in news_list %}
        <article class="kratos-hentry clearfix">
            <div class="kratos-entry-thumb">
                <a href="{{ url_for('index_blue.detail', news_id=news.id) }}"><img
                        src="{{ news.get('index_image_url') }}"></a>
            </div>
            <div class="kratos-post-inner">
                <header class="kratos-entry-header clearfix">
                    <h2 class="kratos-entry-title"><a
                            href="{{ url_for('index_blue.detail', news_id=news.id) }}">{{ news.title }}</a>
                    </h2>
                    <div class="kratos-post-meta">
                        <span class="pull-left">
                            <a href="#"><i class="fa fa-calendar"></i> {{ news.create_time }}</a>
                        </span>
                        <span class="visible-lg visible-md visible-sm pull-left">
                            <a href="#"><i class="fa fa-folder-open"></i> 技术教程</a> <a href="#"><i
                                    class="fa fa-comments"></i>
                                0条评论</a>
                        </span>
                        <span class="pull-left">
                            <a href="#"><i class="fa fa-book"></i> 534次阅读</a>
                            <a href="#"><i class="fa fa-thumbs-up"></i> 0人点赞</a>
                        </span>
                    </div>
                </header>
                <div class="kratos-entry-content clearfix">
                    <p>{{ news.get('digest') }}
                    </p>
                </div>
            </div>
        </article>
        {% endfor %}
        {% else %}
        资源暂无，可联系管理员进行反馈

        {% endif %}
    </div>
    <!-- <div class="text-center" id="page-footer">
            <ul class="pagination">
                <li class="active"><a href="https://www.tenlonstudio.com/jsjc">1</a></li>
                <li><a href="https://www.tenlonstudio.com/jsjc/page/2">2</a></li>
                <li><a href="https://www.tenlonstudio.com/jsjc/page/3">3</a></li>
                <li><a href="https://www.tenlonstudio.com/jsjc/page/4">4</a></li>
                <li><a href="https://www.tenlonstudio.com/jsjc/page/2" class="next" title="下一页">&gt;</a></li>
                <li><a href="https://www.tenlonstudio.com/jsjc/page/9" class="extend" title="尾页">»</a></li>
            </ul>
        </div> -->
    {% if paginate %}
    <div class="text-center" id="page-footer">
        <ul class="pagination">
            <li><a href="{{ url_for('index_blue.search') }}?search={{ search }}&page=1" class="extend" title="首页">«</a></li>
            {% if paginate.has_prev %}
            <li><a href="{{ url_for('index_blue.search') }}?search={{ search }}&page={{ paginate.prev_num }}" class="prev" title="上一页">&lt;</a></li>
            {% endif %}

            {% for num in paginate.iter_pages() %}
            {% if num == paginate.page %}
            <li class="active"><a href="{{ url_for('index_blue.search') }}?search={{ search }}&page={{ num }}">{{ num }}</a></li>
            {% elif num %}
            <li><a href="{{ url_for('index_blue.search') }}?search={{ search }}&page={{ num }}">{{ num }}</a></li>
            {% else %}
            <li><a href="#">...</a></li>
            {% endif %}
            {% endfor %}

            {% if paginate.has_next %}
            <li><a href="{{ url_for('index_blue.search') }}?search={{ search }}&page={{ paginate.next_num }}" class="next" title="下一页">&gt;</a></li>
            {% endif %}
            <li><a href="{{ url_for('index_blue.search') }}?search={{ search }}&page={{ paginate.pages }}" class="extend" title="尾页">»</a></li>
        </ul>
    </div>
    {% endif %}
</section>
{% endblock content %}


{% block js_2 %}
{% endblock js_2 %}